#! /usr/bin/python
# Filename:pickling.py

import cPickle as p;
#import pickle as p;

shoplistfile = 'shoplistfile.data';
shoplist = ['apple','mango','carrot'];

f = file(shoplistfile,'w');
p.dump(shoplist,f);
f.close();

del shoplist;

f = file(shoplistfile);
storedlist = p.load(f);
f.close();
print storedlist;

